From 132231d10343608faf5892785a08acc500326d04 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Thu, 16 Jul 2015 15:23:37 +0200 Subject: [PATCH] dmar: fix double free in error paths following c/s a8bc99b Several error paths would end up freeing scope->devices twice. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/drivers/passthrough/vtd/dmar.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c index 8ed1e24d85..267268860a 100644 --- a/xen/drivers/passthrough/vtd/dmar.c +++ b/xen/drivers/passthrough/vtd/dmar.c @@ -88,6 +88,7 @@ static void scope_devices_free(struct dmar_scope *scope) scope->devices_cnt = 0; xfree(scope->devices); + scope->devices = NULL; } static void __init disable_all_dmar_units(void) -- 2.30.2